<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>if语句</title>
</head>
<body>
    <p>语法：</p>
    <p>if(条件)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;条件成立时要执行的代码<br>}</p>
    <p>else<br>{&nbsp;&nbsp;&nbsp;&nbsp;条件不成立时执行的代码<br>}</p>
</body>
</html> 